package com.leng.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;

import java.io.Serializable;
import java.time.LocalDateTime;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author leng
 * @since 2022-08-21
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName("biz_in_stock")
public class InStock extends Model<InStock> {

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 入库单编号
     */
    @TableField("in_num")
    private String inNum;

    /**
     * 类型：1：捐赠，2：下拨，3：采购,4:退货入库
     */
    @TableField("type")
    private Integer type;

    /**
     * 操作人员
     */
    @TableField("operator")
    private String operator;

    /**
     * 入库单创建时间
     */
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    /**
     * 入库单修改时间
     */
    @TableField("modified")
    private LocalDateTime modified;

    /**
     * 物资总数
     */
    @TableField("product_number")
    private Integer productNumber;

    /**
     * 来源
     */
    @TableField("supplier_id")
    private Long supplierId;

    /**
     * 描述信息
     */
    @TableField("remark")
    private String remark;

    /**
     * 0:正常入库单,1:已进入回收,2:等待审核
     */
    @TableField("status")
    private Integer status;


    @Override
    public Serializable pkVal() {
        return this.id;
    }

}
